# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=xmrig-proxy
pkgver=6.21.0
pkgrel=0
pkgdesc="XMRig Proxy is a high performance Monero (XMR) Stratum protocol proxy"
url="https://xmrig.com/proxy"
arch="all"
license="GPL-3.0-or-later"
options="!check" # No test suite from upstream
makedepends="
	cmake
	libuv-dev
	openssl-dev>3
	samurai
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/xmrig/xmrig-proxy/archive/v$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	install -Dm 755 build/xmrig-proxy "$pkgdir"/usr/bin/xmrig-proxy

	install -Dm 644 -t "$pkgdir"/usr/share/doc/$pkgname/ README.md
}

sha512sums="
786005600b2077fd962687620453b6e00392214a18c7af918a660aedf8ef8f8ff99214dad2eb5ccf5ae5402425f3390455a048ec8cd196a33c4333a0223f6a78  xmrig-proxy-6.21.0.tar.gz
"
